/**
 */
package org.autosar.schema.r4.impl;

import java.util.Collection;

import org.autosar.schema.r4.EVENTGROUPSTYPE;
import org.autosar.schema.r4.R4Package;
import org.autosar.schema.r4.SOMEIPSERVICEINSTANCETYPE;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.eclipse.emf.ecore.util.EDataTypeEList;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>SOMEIPSERVICEINSTANCETYPE</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * </p>
 * <ul>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getSHORTNAME <em>SHORTNAME</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getCATEGORY <em>CATEGORY</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getDESC <em>DESC</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getSERVICEID <em>SERVICEID</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getINSTANCEID <em>INSTANCEID</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getPROTOCOLVERSION <em>PROTOCOLVERSION</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getINTERFACEVERSION <em>INTERFACEVERSION</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getSERVICEINTERFACETYPE <em>SERVICEINTERFACETYPE</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getEVENTGROUPS <em>EVENTGROUPS</em>}</li>
 *   <li>{@link org.autosar.schema.r4.impl.SOMEIPSERVICEINSTANCETYPEImpl#getECUCQUERY <em>ECUCQUERY</em>}</li>
 * </ul>
 *
 * @generated
 */
public class SOMEIPSERVICEINSTANCETYPEImpl extends MinimalEObjectImpl.Container implements SOMEIPSERVICEINSTANCETYPE {
	/**
	 * The default value of the '{@link #getSHORTNAME() <em>SHORTNAME</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSHORTNAME()
	 * @generated
	 * @ordered
	 */
	protected static final String SHORTNAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getSHORTNAME() <em>SHORTNAME</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSHORTNAME()
	 * @generated
	 * @ordered
	 */
	protected String sHORTNAME = SHORTNAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getCATEGORY() <em>CATEGORY</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCATEGORY()
	 * @generated
	 * @ordered
	 */
	protected static final String CATEGORY_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getCATEGORY() <em>CATEGORY</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCATEGORY()
	 * @generated
	 * @ordered
	 */
	protected String cATEGORY = CATEGORY_EDEFAULT;

	/**
	 * The default value of the '{@link #getDESC() <em>DESC</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDESC()
	 * @generated
	 * @ordered
	 */
	protected static final String DESC_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getDESC() <em>DESC</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDESC()
	 * @generated
	 * @ordered
	 */
	protected String dESC = DESC_EDEFAULT;

	/**
	 * The default value of the '{@link #getSERVICEID() <em>SERVICEID</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSERVICEID()
	 * @generated
	 * @ordered
	 */
	protected static final int SERVICEID_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getSERVICEID() <em>SERVICEID</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSERVICEID()
	 * @generated
	 * @ordered
	 */
	protected int sERVICEID = SERVICEID_EDEFAULT;

	/**
	 * This is true if the SERVICEID attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean sERVICEIDESet;

	/**
	 * The default value of the '{@link #getINSTANCEID() <em>INSTANCEID</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getINSTANCEID()
	 * @generated
	 * @ordered
	 */
	protected static final int INSTANCEID_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getINSTANCEID() <em>INSTANCEID</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getINSTANCEID()
	 * @generated
	 * @ordered
	 */
	protected int iNSTANCEID = INSTANCEID_EDEFAULT;

	/**
	 * This is true if the INSTANCEID attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean iNSTANCEIDESet;

	/**
	 * The default value of the '{@link #getPROTOCOLVERSION() <em>PROTOCOLVERSION</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPROTOCOLVERSION()
	 * @generated
	 * @ordered
	 */
	protected static final int PROTOCOLVERSION_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getPROTOCOLVERSION() <em>PROTOCOLVERSION</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPROTOCOLVERSION()
	 * @generated
	 * @ordered
	 */
	protected int pROTOCOLVERSION = PROTOCOLVERSION_EDEFAULT;

	/**
	 * This is true if the PROTOCOLVERSION attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean pROTOCOLVERSIONESet;

	/**
	 * The default value of the '{@link #getINTERFACEVERSION() <em>INTERFACEVERSION</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getINTERFACEVERSION()
	 * @generated
	 * @ordered
	 */
	protected static final int INTERFACEVERSION_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getINTERFACEVERSION() <em>INTERFACEVERSION</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getINTERFACEVERSION()
	 * @generated
	 * @ordered
	 */
	protected int iNTERFACEVERSION = INTERFACEVERSION_EDEFAULT;

	/**
	 * This is true if the INTERFACEVERSION attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean iNTERFACEVERSIONESet;

	/**
	 * The default value of the '{@link #getSERVICEINTERFACETYPE() <em>SERVICEINTERFACETYPE</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSERVICEINTERFACETYPE()
	 * @generated
	 * @ordered
	 */
	protected static final String SERVICEINTERFACETYPE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getSERVICEINTERFACETYPE() <em>SERVICEINTERFACETYPE</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSERVICEINTERFACETYPE()
	 * @generated
	 * @ordered
	 */
	protected String sERVICEINTERFACETYPE = SERVICEINTERFACETYPE_EDEFAULT;

	/**
	 * The cached value of the '{@link #getEVENTGROUPS() <em>EVENTGROUPS</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEVENTGROUPS()
	 * @generated
	 * @ordered
	 */
	protected EVENTGROUPSTYPE eVENTGROUPS;

	/**
	 * The cached value of the '{@link #getECUCQUERY() <em>ECUCQUERY</em>}' attribute list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getECUCQUERY()
	 * @generated
	 * @ordered
	 */
	protected EList<String> eCUCQUERY;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected SOMEIPSERVICEINSTANCETYPEImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return R4Package.Literals.SOMEIPSERVICEINSTANCETYPE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getSHORTNAME() {
		return sHORTNAME;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSHORTNAME(String newSHORTNAME) {
		String oldSHORTNAME = sHORTNAME;
		sHORTNAME = newSHORTNAME;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__SHORTNAME, oldSHORTNAME, sHORTNAME));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCATEGORY() {
		return cATEGORY;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCATEGORY(String newCATEGORY) {
		String oldCATEGORY = cATEGORY;
		cATEGORY = newCATEGORY;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__CATEGORY, oldCATEGORY, cATEGORY));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getDESC() {
		return dESC;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setDESC(String newDESC) {
		String oldDESC = dESC;
		dESC = newDESC;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__DESC, oldDESC, dESC));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getSERVICEID() {
		return sERVICEID;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSERVICEID(int newSERVICEID) {
		int oldSERVICEID = sERVICEID;
		sERVICEID = newSERVICEID;
		boolean oldSERVICEIDESet = sERVICEIDESet;
		sERVICEIDESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEID, oldSERVICEID, sERVICEID, !oldSERVICEIDESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetSERVICEID() {
		int oldSERVICEID = sERVICEID;
		boolean oldSERVICEIDESet = sERVICEIDESet;
		sERVICEID = SERVICEID_EDEFAULT;
		sERVICEIDESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEID, oldSERVICEID, SERVICEID_EDEFAULT, oldSERVICEIDESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetSERVICEID() {
		return sERVICEIDESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getINSTANCEID() {
		return iNSTANCEID;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setINSTANCEID(int newINSTANCEID) {
		int oldINSTANCEID = iNSTANCEID;
		iNSTANCEID = newINSTANCEID;
		boolean oldINSTANCEIDESet = iNSTANCEIDESet;
		iNSTANCEIDESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__INSTANCEID, oldINSTANCEID, iNSTANCEID, !oldINSTANCEIDESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetINSTANCEID() {
		int oldINSTANCEID = iNSTANCEID;
		boolean oldINSTANCEIDESet = iNSTANCEIDESet;
		iNSTANCEID = INSTANCEID_EDEFAULT;
		iNSTANCEIDESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, R4Package.SOMEIPSERVICEINSTANCETYPE__INSTANCEID, oldINSTANCEID, INSTANCEID_EDEFAULT, oldINSTANCEIDESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetINSTANCEID() {
		return iNSTANCEIDESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getPROTOCOLVERSION() {
		return pROTOCOLVERSION;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPROTOCOLVERSION(int newPROTOCOLVERSION) {
		int oldPROTOCOLVERSION = pROTOCOLVERSION;
		pROTOCOLVERSION = newPROTOCOLVERSION;
		boolean oldPROTOCOLVERSIONESet = pROTOCOLVERSIONESet;
		pROTOCOLVERSIONESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__PROTOCOLVERSION, oldPROTOCOLVERSION, pROTOCOLVERSION, !oldPROTOCOLVERSIONESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetPROTOCOLVERSION() {
		int oldPROTOCOLVERSION = pROTOCOLVERSION;
		boolean oldPROTOCOLVERSIONESet = pROTOCOLVERSIONESet;
		pROTOCOLVERSION = PROTOCOLVERSION_EDEFAULT;
		pROTOCOLVERSIONESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, R4Package.SOMEIPSERVICEINSTANCETYPE__PROTOCOLVERSION, oldPROTOCOLVERSION, PROTOCOLVERSION_EDEFAULT, oldPROTOCOLVERSIONESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetPROTOCOLVERSION() {
		return pROTOCOLVERSIONESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getINTERFACEVERSION() {
		return iNTERFACEVERSION;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setINTERFACEVERSION(int newINTERFACEVERSION) {
		int oldINTERFACEVERSION = iNTERFACEVERSION;
		iNTERFACEVERSION = newINTERFACEVERSION;
		boolean oldINTERFACEVERSIONESet = iNTERFACEVERSIONESet;
		iNTERFACEVERSIONESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__INTERFACEVERSION, oldINTERFACEVERSION, iNTERFACEVERSION, !oldINTERFACEVERSIONESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetINTERFACEVERSION() {
		int oldINTERFACEVERSION = iNTERFACEVERSION;
		boolean oldINTERFACEVERSIONESet = iNTERFACEVERSIONESet;
		iNTERFACEVERSION = INTERFACEVERSION_EDEFAULT;
		iNTERFACEVERSIONESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, R4Package.SOMEIPSERVICEINSTANCETYPE__INTERFACEVERSION, oldINTERFACEVERSION, INTERFACEVERSION_EDEFAULT, oldINTERFACEVERSIONESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetINTERFACEVERSION() {
		return iNTERFACEVERSIONESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getSERVICEINTERFACETYPE() {
		return sERVICEINTERFACETYPE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSERVICEINTERFACETYPE(String newSERVICEINTERFACETYPE) {
		String oldSERVICEINTERFACETYPE = sERVICEINTERFACETYPE;
		sERVICEINTERFACETYPE = newSERVICEINTERFACETYPE;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEINTERFACETYPE, oldSERVICEINTERFACETYPE, sERVICEINTERFACETYPE));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EVENTGROUPSTYPE getEVENTGROUPS() {
		return eVENTGROUPS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetEVENTGROUPS(EVENTGROUPSTYPE newEVENTGROUPS, NotificationChain msgs) {
		EVENTGROUPSTYPE oldEVENTGROUPS = eVENTGROUPS;
		eVENTGROUPS = newEVENTGROUPS;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS, oldEVENTGROUPS, newEVENTGROUPS);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEVENTGROUPS(EVENTGROUPSTYPE newEVENTGROUPS) {
		if (newEVENTGROUPS != eVENTGROUPS) {
			NotificationChain msgs = null;
			if (eVENTGROUPS != null)
				msgs = ((InternalEObject)eVENTGROUPS).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS, null, msgs);
			if (newEVENTGROUPS != null)
				msgs = ((InternalEObject)newEVENTGROUPS).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS, null, msgs);
			msgs = basicSetEVENTGROUPS(newEVENTGROUPS, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS, newEVENTGROUPS, newEVENTGROUPS));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<String> getECUCQUERY() {
		if (eCUCQUERY == null) {
			eCUCQUERY = new EDataTypeEList<String>(String.class, this, R4Package.SOMEIPSERVICEINSTANCETYPE__ECUCQUERY);
		}
		return eCUCQUERY;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS:
				return basicSetEVENTGROUPS(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SHORTNAME:
				return getSHORTNAME();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__CATEGORY:
				return getCATEGORY();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__DESC:
				return getDESC();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEID:
				return getSERVICEID();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__INSTANCEID:
				return getINSTANCEID();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__PROTOCOLVERSION:
				return getPROTOCOLVERSION();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__INTERFACEVERSION:
				return getINTERFACEVERSION();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEINTERFACETYPE:
				return getSERVICEINTERFACETYPE();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS:
				return getEVENTGROUPS();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__ECUCQUERY:
				return getECUCQUERY();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SHORTNAME:
				setSHORTNAME((String)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__CATEGORY:
				setCATEGORY((String)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__DESC:
				setDESC((String)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEID:
				setSERVICEID((Integer)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__INSTANCEID:
				setINSTANCEID((Integer)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__PROTOCOLVERSION:
				setPROTOCOLVERSION((Integer)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__INTERFACEVERSION:
				setINTERFACEVERSION((Integer)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEINTERFACETYPE:
				setSERVICEINTERFACETYPE((String)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS:
				setEVENTGROUPS((EVENTGROUPSTYPE)newValue);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__ECUCQUERY:
				getECUCQUERY().clear();
				getECUCQUERY().addAll((Collection<? extends String>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SHORTNAME:
				setSHORTNAME(SHORTNAME_EDEFAULT);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__CATEGORY:
				setCATEGORY(CATEGORY_EDEFAULT);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__DESC:
				setDESC(DESC_EDEFAULT);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEID:
				unsetSERVICEID();
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__INSTANCEID:
				unsetINSTANCEID();
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__PROTOCOLVERSION:
				unsetPROTOCOLVERSION();
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__INTERFACEVERSION:
				unsetINTERFACEVERSION();
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEINTERFACETYPE:
				setSERVICEINTERFACETYPE(SERVICEINTERFACETYPE_EDEFAULT);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS:
				setEVENTGROUPS((EVENTGROUPSTYPE)null);
				return;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__ECUCQUERY:
				getECUCQUERY().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SHORTNAME:
				return SHORTNAME_EDEFAULT == null ? sHORTNAME != null : !SHORTNAME_EDEFAULT.equals(sHORTNAME);
			case R4Package.SOMEIPSERVICEINSTANCETYPE__CATEGORY:
				return CATEGORY_EDEFAULT == null ? cATEGORY != null : !CATEGORY_EDEFAULT.equals(cATEGORY);
			case R4Package.SOMEIPSERVICEINSTANCETYPE__DESC:
				return DESC_EDEFAULT == null ? dESC != null : !DESC_EDEFAULT.equals(dESC);
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEID:
				return isSetSERVICEID();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__INSTANCEID:
				return isSetINSTANCEID();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__PROTOCOLVERSION:
				return isSetPROTOCOLVERSION();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__INTERFACEVERSION:
				return isSetINTERFACEVERSION();
			case R4Package.SOMEIPSERVICEINSTANCETYPE__SERVICEINTERFACETYPE:
				return SERVICEINTERFACETYPE_EDEFAULT == null ? sERVICEINTERFACETYPE != null : !SERVICEINTERFACETYPE_EDEFAULT.equals(sERVICEINTERFACETYPE);
			case R4Package.SOMEIPSERVICEINSTANCETYPE__EVENTGROUPS:
				return eVENTGROUPS != null;
			case R4Package.SOMEIPSERVICEINSTANCETYPE__ECUCQUERY:
				return eCUCQUERY != null && !eCUCQUERY.isEmpty();
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuilder result = new StringBuilder(super.toString());
		result.append(" (sHORTNAME: ");
		result.append(sHORTNAME);
		result.append(", cATEGORY: ");
		result.append(cATEGORY);
		result.append(", dESC: ");
		result.append(dESC);
		result.append(", sERVICEID: ");
		if (sERVICEIDESet) result.append(sERVICEID); else result.append("<unset>");
		result.append(", iNSTANCEID: ");
		if (iNSTANCEIDESet) result.append(iNSTANCEID); else result.append("<unset>");
		result.append(", pROTOCOLVERSION: ");
		if (pROTOCOLVERSIONESet) result.append(pROTOCOLVERSION); else result.append("<unset>");
		result.append(", iNTERFACEVERSION: ");
		if (iNTERFACEVERSIONESet) result.append(iNTERFACEVERSION); else result.append("<unset>");
		result.append(", sERVICEINTERFACETYPE: ");
		result.append(sERVICEINTERFACETYPE);
		result.append(", eCUCQUERY: ");
		result.append(eCUCQUERY);
		result.append(')');
		return result.toString();
	}

} //SOMEIPSERVICEINSTANCETYPEImpl
